import fetch from 'common/src/utils/fetch'


/**
 *获取互选申请设置
 */
function getElcMutualApplyTurns(calendarId,projectId,category) {
    return fetch({
        url: '/api/electionservice/elcMutualApplyTurns/getElcMutualApplyTurns',
        params:{calendarId:calendarId,projectId:projectId,category:category},
        method: 'get',
    });
}

/**
 *申请
 */
function saveData(data) {
    return fetch({
        url: '/api/electionservice/elcMutualApplyTurns/save',
        data:data,
        method: 'post',
    });
}

/**
 *修改
 */
function updateData(data) {
    return fetch({
        url: '/api/electionservice/elcMutualApplyTurns/update',
        data:data,
        method: 'post',
    });
}
//查询
function getSwitchMessage(calendarId,projectId,category){
    return fetch({
        url: '/api/electionservice/elcMutualApply/elcMutualApplySwitch?calendarId='+calendarId+'&projectId='+projectId+'&category='+category,
        method: 'get',
    });
}
//提交
function sbmitSwitchMessage(data){
    return fetch({
        url: '/api/electionservice/elcMutualApply/elcMutualApplySwitch',
        data,
        method: 'post',
    });
}
export default {
    "getElcMutualApplyTurns": getElcMutualApplyTurns,
    "saveData": saveData,
    "updateData":updateData,
    getSwitchMessage,
    sbmitSwitchMessage

}



